#include "Vol_Samp.h"
//将旋钮ADC值换算成控制值
uint16_t u16SampleSwitchPotValue(void)
{
    uint16_t PotValue;
    uint16_t u16PotAdcVal = u16AdcGetAverageValue(AN_DEF_POT);//获取旋钮ADC平均值,0~4095
    /*换算开环模式下使用的CCR值*/
    PotValue = u16PotAdcVal>>1;//移位代替除法，0~2047
    if( PotValue>2000 ){
        PotValue = 2000;//限幅，0~2000
    }
	return PotValue;
}
